import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import axiosUtils from './service/index'
import { fa } from 'element-plus/es/locale'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'normalize.css'
import './assets/css/index.less'

const app = createApp(App)
app.use(router)
app.use(store)
app.use(ElementPlus)


// 全局注册el - icon
for (const [name, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(name, component);
}


app.mount('#app')


interface DataType {
    data: any,
    returnCode: number,
    returnMessage: string,
    success: boolean
}

// const result = axiosUtils.request<DataType>({
//     url: '/test/test1',
//     method: 'GET',
//     showLoading: true
// }).then((res) => {
//     console.log(res.data.name)
// })

// const result = axiosUtils.get<DataType>({
//     url: '/test/test1',
//     showLoading: true
// }).then((res) => {
//     console.log(res.data)
// })

